<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>table模块快速使用</title>
    <link rel="stylesheet" href="/layui/lib/layui-v2.5.5/css/layui.css" media="all">

    <link rel="stylesheet" href="/js/layui_exts/tree_themes/auth-skin-default.css">

</head>
<body>
<form class="layui-form">
    <input type="hidden" name="id"value="{{ $rows->id }}">
    <div class="layui-form-item">
        <label class="layui-form-label">省</label>
        <div class="layui-input-inline">
            <input type="text" name="province" required lay-verify="required"placeholder="请输入省份" value="{{ $rows->province }}" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">市</label>
        <div class="layui-input-inline">
            <input type="text" name="city" required lay-verify="required" placeholder="请输入市" value="{{ $rows->city }}" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">区</label>
        <div class="layui-input-inline">
            <input type="text" name="jurisdiction" required lay-verify="required" placeholder="请输入区"value="{{ $rows->jurisdiction }}" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">小区</label>
        <div class="layui-input-inline">
            <input type="text" name="community" required lay-verify="required" placeholder="请输入小区" value="{{ $rows->community }}" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">金额</label>
        <div class="layui-input-inline">
            <input type="text" name="money" required lay-verify="required" placeholder="请填写金额"value="{{ $rows->money }}" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" type="submit" lay-submit lay-filter="LAY-auth-tree-submit">提交</button>
            <button class="layui-btn layui-btn-primary" type="reset">重置</button>
        </div>
    </div>
</form>
<script src="/layui/lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>
<script src="/layui/lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
<script>
    layui.use(['jquery', 'form'], function(){
        var $ = layui.jquery;
        var form = layui.form;
        form.on('submit(LAY-auth-tree-submit)', function(obj){
            var result=obj.field;
            $.post("/admin/address_update",{'_token':'{{ csrf_token() }}',result},function(res){
                if(res==1){
                    parent.layer.closeAll();
                    parent.location.reload();
                }
            })
            return false;
        });
    });

</script>
</body>
</html>